package com.jumper.study.common.helper;

import java.time.LocalDate;
import java.util.Map;

public final class DateStatHelper {
    
    public static Map<String, Long> fillEmpty(Map<String, Long> datas, LocalDate start, LocalDate end) {

        // 填充空数据
        for (LocalDate date = start; date.isBefore(end); date = date.plusDays(1)) {
            if (!datas.containsKey(date.toString())) {
                datas.put(date.toString(), 0L);
            }
        }
        
        return datas;
    }
}
